var entityCollection = require('../../../Base/server/controllers/EntityCollection');

//查找所有交接区ID
exports.distinctId = function (completeFun) {
    var connectArea = entityCollection.getEntity("ConnectArea");
    connectArea.Entity.collection.distinct('_id', function (err, records) {
        if (err) {
            var newErr = new Error();
            newErr.leval = 9;
            newErr.title = '查询错误';
            newErr.message = '查询看板需求错误，请检查查询参数！';
            completeFun(newErr);
        } else {
            completeFun(null, records);
        }
    });
};
